from interface.member import MemberInterface
from utils.get_keyword import GetKeyword
from utils.request_method import SendMethod
from utils.mysql_tools import DBtools


class AddCart:

    def __init__(self,headers):
        self.url='http://47.108.206.100:8085'
        self.headers = headers # 获取登录的用户令牌

    # 添加商品到购物车
    def cart_add(self, params):
        method = 'post'
        url = self.url + '/cart/add'
        return SendMethod.send_method(method, url, json=params, headers=self.headers)



